require("core.IAppGrow")

tcl_app = IAppGrow:new()

-- function tcl_app:startUp()
--     logger.debug('tcl_app','tcl_app:startUp')
-- end


function tcl_app:setAdapter()
    logger.debug('tcl_app', 'tcl_app:setAdapter')
end

function tcl_app:isLeaveHere()
    logger.debug('tcl_app', 'tcl_app:isLeaveHere')
    return {leave = false, success = false}
end

function tcl_app:isStarted()
    logger.debug('tcl_app', ' tcl_app:isStarted')
    if (Fun.isColor(  94,  152, 0xffffff, 85) and 
        Fun.isColor(  98,  158, 0x333333, 85) and 
        Fun.isColor( 980,  170, 0x2d3132, 85) and 
        Fun.isColor( 160, 1820, 0x2c3032, 85) and 
        Fun.isColor( 402, 1780, 0x5590ff, 85) and 
        Fun.isColor( 682, 1818, 0x606364, 85) and 
        Fun.isColor( 930, 1822, 0x2c3132, 85)) then
        logger.debug('tcl_app','这是TCLapp主页面')
        return true
    end
    return false
end

-- function tcl_app:do_regist(params)
--     logger.debug('tcl_app', '-tcl_app:do_regist')
--     logger.debug('tcl_app', '-sms_project_code：'..params.sms_project_code)

--     local phone_num = smsapi.fetch_phonenum(params.sms_project_code)
--     logger.debug('tcl_app', ' 获取手机号码=' .. phone_num)
--     local vcode = smsapi.fetch_code()
--     logger.debug('tcl_app', ' 获取验证码=' .. vcode)
--     return {
--         phoneNum = phone_num,
--         password = vcode,
--         description = '注册成功'
--     }

-- end

-- function tcl_app:do_play() logger.debug('tcl_app', 'tcl_app:do_play')  end

do return tcl_app end
